<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>8 模板语法-指令</title>
    <script src="js/vue.global.js"></script>
    <script src="https://unpkg.com/vue-router@4"></script>
</head>
<body>
<div id = "app"></div>
<script type = "text/javascript">
    const myMixin = {
        data() {
            return {
                message: 'hello',
                foo: 'runoob'
            }
        }
    }

    const app = Vue.createApp({
        mixins: [myMixin],
        data() {
            return {
                message: 'goodbye',
                bar: 'def'
            }
        },
        created() {
            document.write(JSON.stringify(this.$data))
        }
    })

    app.mount('#app')
</script>
</body>
</html>